//
//  LBNavBarView.m
//  loveBeen
//
//  Created by 李田 on 16/11/21.
//  Copyright © 2016年 loveBeen. All rights reserved.
//

#import "LBNavBarView.h"

@implementation LBNavBarView

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        [self setupUI];
    }
    return self;
}

#pragma mark - 搭建界面
- (void)setupUI{
    //    MARK: 左边的btn
    UIButton *leftBtn = [[UIButton alloc] init];
    
    [leftBtn setImage:[UIImage imageNamed:@"icon_white_scancode"] forState:UIControlStateNormal];
    [leftBtn setImage:[UIImage imageNamed:@"icon_black_scancode"] forState:UIControlStateSelected];
//    leftBtn.alpha = 0.0;
    [self addSubview:leftBtn];
    
    UIButton *rightBtn = [[UIButton alloc] init];
    
    [rightBtn setImage:[UIImage imageNamed:@"icon_search_white"] forState:UIControlStateNormal];
    [rightBtn setImage:[UIImage imageNamed:@"icon_search"] forState:UIControlStateSelected];
    [self addSubview:rightBtn];
    
    //    MARK: 布局
    [leftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(25);
        make.bottom.mas_equalTo(-15);
    }];
    
    [rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-25);
        make.bottom.equalTo(leftBtn);
    }];
}

@end
